package com.example.dbpage.bean;

import android.arch.persistence.room.Entity;
import android.arch.persistence.room.Ignore;
import android.arch.persistence.room.PrimaryKey;

/**
 * Created by zhangfang on 2018/2/10.
 */


@Entity(tableName = "users")
public class Users {
    @PrimaryKey(autoGenerate = true)
    private Long id;
    private int age;
    private String name;

    @Ignore
    public Users(Long id, int age, String name) {
        this.id = id;
        this.age = age;
        this.name = name;
    }

    @Ignore
    public Users(int age, String name) {
        this.age = age;
        this.name = name;
    }

    public Users() {
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "Users{" +
            "id=" + id +
            ", age=" + age +
            ", name='" + name + '\'' +
            '}';
    }
}
